﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ComboBox, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	_DB:AddCodeHelp("OnTabPressed", [[Run when the Tab key is pressed while the comboBox has keyboard focus]], [[OnTabPressed()]])
	_DB:AddCodeHelp("OnTextChanged", [[Run when the comboBox's text is changed]], [[OnTextChanged(text)]])
	_DB:AddCodeHelp("OnValueChanged", [[Run when the choosed item is changed]], [[OnValueChanged(value)]])
	_DB:AddCodeHelp("OnEditFocusGained", [[Run when the comboBox becomes focused for keyboard input]], [[OnEditFocusGained()]])
	_DB:AddCodeHelp("OnEscapePressed", [[Run when the Escape key is pressed while the comboBox has keyboard focus]], [[OnEscapePressed()]])
	_DB:AddCodeHelp("OnEnterPressed", [[Run when the Enter (or Return) key is pressed while the comboBox has keyboard focus]], [[OnEnterPressed()]])
	_DB:AddCodeHelp("OnEditFocusLost", [[Run when the comboBox loses keyboard input focus]], [[OnEditFocusLost()]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ComboBox, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("SetItem", [=[Modify or add an item in the item list]=], [=[SetItem(value, text, [icon], [frame])]=])
	_DB:AddCodeHelp("SetText", [=[Sets the text displayed as the button's label]=], [=[SetText("text")]=])
	_DB:AddCodeHelp("HasFocus", [=[Returns whether the edit box is currently focused for keyboard input]=], [=[HasFocus()]=])
	_DB:AddCodeHelp("GetText", [=[Returns the text of the button's label]=], [=[GetText()]=])
	_DB:AddCodeHelp("SetAutoFocus", [=[Sets whether the edit box automatically acquires keyboard input focus]=], [=[SetAutoFocus(enable)]=])
	_DB:AddCodeHelp("SetEditable", [=[Set the comboBox's editable]=], [=[SetEditable(flag)]=])
	_DB:AddCodeHelp("Clear", [=[Removes all messages displayed in the frame]=], [=[Clear()]=])
	_DB:AddCodeHelp("SetList", [=[Build item list from a table]=], [=[SetList(table)]=])
	_DB:AddCodeHelp("SetFocus", [=[Focuses the edit box for keyboard input]=], [=[SetFocus()]=])
	_DB:AddCodeHelp("GetValue", [=[Returns the value representing the current position of the slider thumb]=], [=[GetValue()]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("GetDisplayItemCount", [=[Gets the display item count of the comboBox]=], [=[GetDisplayItemCount()]=])
	_DB:AddCodeHelp("IsAutoFocus", [=[Returns whether the edit box automatically acquires keyboard input focus]=], [=[IsAutoFocus()]=])
	_DB:AddCodeHelp("GetTextObject", [=[Return the text object of the comboBox, using for special needs]=], [=[GetTextObject()]=])
	_DB:AddCodeHelp("AddItem", [=[Add an item to the comboBox]=], [=[AddItem(value, text, [icon], [frame])]=])
	_DB:AddCodeHelp("GetEditable", [=[Return whether the comboBox is editable]=], [=[GetEditable()]=])
	_DB:AddCodeHelp("SetValue", [=[Sets the value representing the position of the slider thumb]=], [=[SetValue(value)]=])
	_DB:AddCodeHelp("SetDisplayItemCount", [=[Sets the display item count of the comboBox]=], [=[SetDisplayItemCount(num)]=])
	_DB:AddCodeHelp("ClearFocus", [=[Releases keyboard input focus from the edit box]=], [=[ClearFocus()]=])
	_DB:AddCodeHelp("RemoveItem", [=[Remove an item from the item list by key]=], [=[RemoveItem(value)]=])
	_DB:AddCodeHelp("GetItem", [=[Get an item's info from the item list by key]=], [=[GetItem(value)]=])
	_DB:AddCodeHelp("GetItemByIndex", [=[Get an item's info from the item list by index]=], [=[GetItemByIndex(index)]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ComboBox, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

	_DB:AddCodeHelp("ItemCount", [[the item's count]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Text", [[the text displayed on the combobox]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("AutoFocus", [[true if the ComboBox automatically acquires keyboard input focus]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("DisplayItemCount", [[the count of items to be displayed in the dropdown list of the comboBox]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Items", [[a table that contains Text of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("Frames", [[a table that contains frames of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("Icons", [[a table that contains icons of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("Value", [[the choosed item's value]], IGAS:GetPropertyType("Object"))
	_DB:AddCodeHelp("Editable", [[true if the combobox's text can be edited, false if the combobox is only selectable]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Keys", [[a table that contains keys of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("HideDropDownButton", [[true to hide the drop down button, make it just look like a textbox]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Style", [[the combobox's style]], IGAS:GetPropertyType("ComboBoxStyle"))
end
